package cn.micro.eye.service;

import cn.micro.eye.commons.auth.MicroToken;
import cn.micro.eye.commons.mybatis.extension.IMicroService;
import cn.micro.eye.entity.Account;
import cn.micro.eye.model.add.AccountRegister;
import cn.micro.eye.model.query.AccountLogin;

/**
 * <p>
 * 账号表，Account-Member为1-1 服务类
 * </p>
 *
 * @author lry
 * @since 2018-10-07
 */
public interface IAccountService extends IMicroService<Account> {

    /**
     * 通用账号注册
     *
     * @param accountRegister {@link AccountRegister}
     * @return true register success
     */
    Boolean addRegister(AccountRegister accountRegister) throws Exception;

    /**
     * 通用账号登录
     *
     * @param accountLogin {@link AccountLogin}
     * @return {@link MicroToken}
     */
    MicroToken queryLogin(AccountLogin accountLogin) throws Exception;

}
